<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="QuickStats.aspx.vb" Inherits="QuickStats" title="AVS Quick Report" EnableViewState="false" EnableEventValidation=false %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <asp:SqlDataSource ID="SqlVendors" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>"
    
    SelectCommand="SELECT Vendors.VendorId, Vendors.Name FROM Vendors INNER JOIN DataSourceVendor ON Vendors.VendorId = DataSourceVendor.VendorId GROUP BY Vendors.VendorId, Vendors.Name ORDER BY Vendors.Name"></asp:SqlDataSource>
  <asp:SqlDataSource ID="SqlDataTypes" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>"
    SelectCommand="SELECT [StatsTypeId], [StatsType] FROM [StatsTypes]"></asp:SqlDataSource>
  <asp:SqlDataSource ID="SqlDataSources" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>"
    SelectCommand="SELECT DataSourceVendor.DataSourceVendorId, DataSources.DataSource FROM DataSourceVendor INNER JOIN DataSources ON DataSourceVendor.DataSourceId = DataSources.DataSourceId WHERE (DataSourceVendor.VendorId = @VendorId) ORDER BY DataSources.DataSource">
    <SelectParameters>
      <asp:ControlParameter ControlID="ddlVendors" Name="VendorId" PropertyName="SelectedValue" />
    </SelectParameters>
  </asp:SqlDataSource>
  <asp:SqlDataSource ID="SqlColleges" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>"
    SelectCommand="SELECT [CollegeId], [ShortName] FROM [Colleges] ORDER BY [ShortName]">
  </asp:SqlDataSource>
  <asp:SqlDataSource ID="SqlReport" runat="server" ConnectionString="<%$ ConnectionStrings:VendorStatsConnectionString %>"
    ProviderName="<%$ ConnectionStrings:VendorStatsConnectionString.ProviderName %>"
    SelectCommand="SELECT '' as College, '' as Vendor, '' as [Data Source], '' as StatType, 0 as [11_2000],0 as [12_2000],0 as [13_2000],0 as [14_2000],0 as [15_2000],0 as [16_2000],0 as [17_2000],0 as [18_2000],0 as [19_2000],0 as [20_2000],0 as [21_2000],0 as [22_2000],0 as YearTotal">
  </asp:SqlDataSource>
  <br />
  <asp:DropDownList ID="ddlVendors" runat="server" DataSourceID="SqlVendors" DataTextField="Name"
    DataValueField="VendorId" Width="191px" AutoPostBack="True">
  </asp:DropDownList>
  <asp:DropDownList ID="ddlDataSources" runat="server" DataSourceID="SqlDataSources"
    DataTextField="DataSource" DataValueField="DataSourceVendorId" Width="393px" AutoPostBack="True">
    <asp:ListItem Selected="True" Value="0">All Data Sources</asp:ListItem>
  </asp:DropDownList><br />
  <asp:DropDownList ID="ddlStatsType" runat="server" DataSourceID="SqlDataTypes" DataTextField="StatsType"
    DataValueField="StatsTypeId" Width="191px">
  </asp:DropDownList><br />
  <asp:DropDownList ID="ddlColleges" runat="server" DataSourceID="SqlColleges" DataTextField="ShortName"
    DataValueField="CollegeId" Width="192px">
  </asp:DropDownList>
  End Date:
  <asp:DropDownList ID="ddlDate" runat="server">
  </asp:DropDownList>
  <asp:Button ID="btnDisplay" runat="server" Text="Display Report" /><br />
  &nbsp;<br />
  <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlReport" AutoGenerateColumns="True" style="text-align: right" EnableViewState="False">
    <AlternatingRowStyle BackColor="WhiteSmoke" />
  </asp:GridView>
</asp:Content>

